package com.ktjy.cn.ink;

import com.ktjy.cn.printer.Ink;
import org.springframework.stereotype.Component;

import java.awt.*;

/**
 * 彩色墨盒
 */

@Component("colorInk")
public class ColorInk implements Ink {
	/**
	 * 打印采彩色文字
	 */
	public String getColor(int red, int green, int blue) {
		Color color = new Color(red, green, blue);
		return "#" + Integer.toHexString(color.getRGB()).substring(2);
	}
}
